<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use common\widgets\avatar\AvatarWidget;
use common\widgets\avatar\AvatarViewWidget;
/* @var $this yii\web\View */
/* @var $model common\models\User */

$this->title = 'Update User: ' . $model->id;
$this->params['breadcrumbs'][] = ['label' => 'Users', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->id, 'url' => ['view', 'id' => $model->id]];
$this->params['breadcrumbs'][] = 'Update';
?>
<div class="site-signup">
    <p>Please fill out the following fields to create:</p>
    <div class="row">
        <div class="col-lg-5">
            <?= AvatarWidget::widget(['imageUrl'=>'']); ?>
            <?php $form = ActiveForm::begin(['id' => 'form-signup']); ?>

            <?= $form->field($model, 'username')->textInput(['autofocus' => true]) ?>

            <?= $form->field($userInfo, 'avatar')->widget(AvatarViewWidget::className(),['imageUrl'=>'']) ?>

            <div class="form-group">
                <?= Html::submitButton($model->isNewRecord ? '添加' : '修改', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
            </div>

            <?php ActiveForm::end(); ?>
        </div>
    </div>
</div>
<script>
    userAspectRatio = 1;
</script>
